package com.jumi.microservice.dto.afterseal;

import com.jumi.microservice.common.exception.BaseException;
import com.jumi.microservice.common.page.PageDomain;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author wangjingdao
 */
public class AfterSealSelfRequest extends PageDomain {
    @ApiModelProperty("仓库昵称")
    private Integer warehouse;
    @ApiModelProperty("订单ID列表，英文逗号分隔")
    private String ids;

    public Integer getWarehouse() {
        return warehouse;
    }

    public void setWarehouse(Integer warehouse) {
        this.warehouse = warehouse;
    }

    public String getIds() {
        return ids;
    }

    public void setIds(String ids) {
        this.ids = ids;
    }

    @Override
    public void checkRequest() {
        if (
                this.warehouse == null && this.ids == null
        ) {
            throw new BaseException(500, "请先选择搜索条件");
        }
    }
}
